﻿CREATE TABLE "SALEOUTS" 
   (	"SERIAL_NO" VARCHAR2(20 BYTE), 
	"SELLIN_DATE" DATE, 
	"SELLOUT_DATE" DATE, 
	"WT_START_DATE" DATE, 
	"WT_END_DATE" DATE, 
	"SHOP_CODE" VARCHAR2(10 BYTE), 
	"SHOP_CELL" VARCHAR2(20 BYTE), 
	"SELLOUT_RESP_MSG" VARCHAR2(160 BYTE), 
	"POINT" VARCHAR2(10 BYTE), 
	"AMT" VARCHAR2(10 BYTE), 
	"SELLOUT_RESP_TYPE" VARCHAR2(10 BYTE), 
	"SELLOUT_TIME" VARCHAR2(8 BYTE), 
	"INCENTIVE_CFM_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"INCENTIVE_CFM_DATE" DATE, 
	"MODEL" VARCHAR2(50 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE), 
	"CLOSE_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"CLOSE_PERIOD" VARCHAR2(10 BYTE), 
	"SMS_YN" VARCHAR2(1 BYTE) DEFAULT 'Y', 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"INCENTIVE_CFM_USER" VARCHAR2(10 BYTE) DEFAULT 'SYS', 
	"CLOSE_USER" VARCHAR2(10 BYTE), 
	"INCENTIVE_CFM_PERIOD" VARCHAR2(12 BYTE), 
	"LAST_UPDATE_DATE" DATE DEFAULT sysdate, 
	"END_USER_CELL" VARCHAR2(20 BYTE), 
	"TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"TRANSFER_DATE" DATE, 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;


   CREATE UNIQUE INDEX "SaleOuts_PR_PK" ON "SALEOUTS" ("SERIAL_NO", "MODEL") 
  ;

  
  ALTER TABLE "SALEOUTS" ADD CONSTRAINT "SaleOuts_PR_PK" PRIMARY KEY ("SERIAL_NO", "MODEL") ENABLE;
  ALTER TABLE "SALEOUTS" MODIFY ("SHOP_CODE" NOT NULL ENABLE);
  ALTER TABLE "SALEOUTS" MODIFY ("SERIAL_NO" NOT NULL ENABLE);
  ALTER TABLE "SALEOUTS" MODIFY ("MODEL" NOT NULL ENABLE);
  ALTER TABLE "SALEOUTS" MODIFY ("INCENTIVE_CFM_FLAG" NOT NULL ENABLE);
  ALTER TABLE "SALEOUTS" MODIFY ("CREATE_DATE" NOT NULL ENABLE);